<!--
  @author duanzuocai
  @since 2018/10/19 23:12
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>后台产品分类列表</title>
</head>
<body>

<div class="layui-fluid">

    <blockquote class="layui-crumb">
        后台产品>产品分类>
        <a lay-href="/categ/list.action">产品分类</a> >
        <zmn th:text="${obj==null ? '':obj.name}">名称</zmn>
    </blockquote>

    <div class="layui-card">
        <div class="layui-split">&nbsp;</div>

        <form method="post" action="/categ/list2.action">
            <div class="layui-form" th:include="categroy/_query2 :: query "></div>
        </form>

        <div class="layui-card-body">
            <div th:replace="categroy/_table2::table"/>
            <script type="text/html" id="zmn-table-tool">
                <div class="layui-btn-container">
                    <div class="layui-btn-group">
                        <zmn th:if="${#authPermit.checkPermit('/categ/updateStatus.action')}">
                        <button class="layui-btn layui-btn-sm" lay-event="start">启用</button>
                        <button class="layui-btn layui-btn-sm" lay-event="stop">停用</button>
                        </zmn>
                    </div>
                    <div class="layui-btn-group">
                        <zmn th:if="${#authPermit.checkPermit('/categ/detail2.action')}">
                            <button th:onclick="modifyProductCategoryTwoName('', [[${vo.parentId}]]);" class="layui-btn layui-btn-sm layui-btn-primary">+新增</button>
                        </zmn>
                        <button class="layui-btn layui-btn-sm layui-btn-primary" lay-href="/categ/list.action">返回上级分类</button>
                    </div>
                </div>
            </script>
        </div>

    </div>
</div>

<script type="text/javascript" th:inline="javascript">

    var json = {
        hasView: [[${#authPermit.checkPermit('/categ/list.action')}]],
        hasEdit: [[${#authPermit.checkPermit('/categ/detail.action')}]],
        hasSort: [[${#authPermit.checkPermit('/categ/updateSort.action')}]],
        hasAttrView: [[${#authPermit.checkPermit('/categ/attr/list.action')}]],
        totalCount: [[${vo.totalCount}]],
        pageSize: [[${vo.pageSize}]],
        pageIndex: [[${vo.pageIndex}]],
        items: [[${items}]]
    };

    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        art_categ_list2: "categroy/zmn.art.categ.list2",
    }).use(['index', 'art_categ_list2']);

</script>
</body>
</html>